package com.dragon.modules.yuegou.entity.member;

import com.baomidou.mybatisplus.annotation.TableName;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogGradeRule;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * 会员等级更新日志实体类<br>
 * 对应的表为：mem_member_grade_log<br>
 * 
 * @author pbuilder generated
 * @date 2022-03-02 15:12:03
 * @company sgy
 * @version 2.0
 */
@TableName("mem_member_grade_log")
@ApiModel(description = "会员等级更新日志")
public class MemberGradeLogEntity {

    /** 主键 */
	@ApiModelProperty("主键")
	protected String id;

    /** 商圈ID */
	@ApiModelProperty("商圈ID")
	protected String busdId;

    /** 会员ID */
	@ApiModelProperty("会员ID")
	protected String memberId;

    /** [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER */
	@ApiModelProperty("[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER")
	protected MemberGradeLogType type;

    /** [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED */
	@ApiModelProperty("[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED")
	protected MemberGradeLogGradeRule gradeRule;

    /** 变化前id */
	@ApiModelProperty("变化前id")
	protected String beforeGradeId;

    /** 更新前等级 */
	@ApiModelProperty("更新前等级")
	protected String beforeGrade;

    /** 变化后id */
	@ApiModelProperty("变化后id")
	protected String alferGradeId;

    /** 更新后等级 */
	@ApiModelProperty("更新后等级")
	protected String afterGrade;

    /** 更新原因 */
	@ApiModelProperty("更新原因")
	protected String reason;

    /** 创建人id */
	@ApiModelProperty("创建人id")
	protected String createdBy;

    /** 创建人 */
	@ApiModelProperty("创建人")
	protected String createdName;

    /** 创建时间 */
	@ApiModelProperty("创建时间")
	protected LocalDateTime createdTime;

	/**
	 * 构造一个空会员等级更新日志实体对象
	 */
	public MemberGradeLogEntity(){
		super();
	}

	/**
	 * 依据其它对象的信息构造一个会员等级更新日志实体对象
	 * 
	 * @param other 其它对象
	 */
	public MemberGradeLogEntity(MemberGradeLogEntity other){
		super();
     	this.id = other.id;
     	this.busdId = other.busdId;
     	this.memberId = other.memberId;
     	this.type = other.type;
     	this.gradeRule = other.gradeRule;
     	this.beforeGradeId = other.beforeGradeId;
     	this.beforeGrade = other.beforeGrade;
     	this.alferGradeId = other.alferGradeId;
     	this.afterGrade = other.afterGrade;
     	this.reason = other.reason;
     	this.createdBy = other.createdBy;
     	this.createdName = other.createdName;
     	this.createdTime = other.createdTime;
	}


	/**
	 * 获取主键
	 * 
	 * @return id 主键
	 */
	public String getId() {
		return id;
	}
  	
	/**
	 * 设置主键
	 * 
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * 获取商圈ID
	 * 
	 * @return busdId 商圈ID
	 */
	public String getBusdId() {
		return busdId;
	}
  	
	/**
	 * 设置商圈ID
	 * 
	 * @param busdId 商圈ID
	 */
	public void setBusdId(String busdId) {
		this.busdId = busdId;
	}

	/**
	 * 获取会员ID
	 * 
	 * @return memberId 会员ID
	 */
	public String getMemberId() {
		return memberId;
	}
  	
	/**
	 * 设置会员ID
	 * 
	 * @param memberId 会员ID
	 */
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	/**
	 * 获取[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 * 
	 * @return type [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 */
	public MemberGradeLogType getType() {
		return type;
	}
  	
	/**
	 * 设置[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 * 
	 * @param type [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER
	 */
	public void setType(MemberGradeLogType type) {
		this.type = type;
	}

	/**
	 * 获取[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 * 
	 * @return gradeRule [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 */
	public MemberGradeLogGradeRule getGradeRule() {
		return gradeRule;
	}
  	
	/**
	 * 设置[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 * 
	 * @param gradeRule [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED
	 */
	public void setGradeRule(MemberGradeLogGradeRule gradeRule) {
		this.gradeRule = gradeRule;
	}

	/**
	 * 获取变化前id
	 * 
	 * @return beforeGradeId 变化前id
	 */
	public String getBeforeGradeId() {
		return beforeGradeId;
	}
  	
	/**
	 * 设置变化前id
	 * 
	 * @param beforeGradeId 变化前id
	 */
	public void setBeforeGradeId(String beforeGradeId) {
		this.beforeGradeId = beforeGradeId;
	}

	/**
	 * 获取更新前等级
	 * 
	 * @return beforeGrade 更新前等级
	 */
	public String getBeforeGrade() {
		return beforeGrade;
	}
  	
	/**
	 * 设置更新前等级
	 * 
	 * @param beforeGrade 更新前等级
	 */
	public void setBeforeGrade(String beforeGrade) {
		this.beforeGrade = beforeGrade;
	}

	/**
	 * 获取变化后id
	 * 
	 * @return alferGradeId 变化后id
	 */
	public String getAlferGradeId() {
		return alferGradeId;
	}
  	
	/**
	 * 设置变化后id
	 * 
	 * @param alferGradeId 变化后id
	 */
	public void setAlferGradeId(String alferGradeId) {
		this.alferGradeId = alferGradeId;
	}

	/**
	 * 获取更新后等级
	 * 
	 * @return afterGrade 更新后等级
	 */
	public String getAfterGrade() {
		return afterGrade;
	}
  	
	/**
	 * 设置更新后等级
	 * 
	 * @param afterGrade 更新后等级
	 */
	public void setAfterGrade(String afterGrade) {
		this.afterGrade = afterGrade;
	}

	/**
	 * 获取更新原因
	 * 
	 * @return reason 更新原因
	 */
	public String getReason() {
		return reason;
	}
  	
	/**
	 * 设置更新原因
	 * 
	 * @param reason 更新原因
	 */
	public void setReason(String reason) {
		this.reason = reason;
	}

	/**
	 * 获取创建人id
	 * 
	 * @return createdBy 创建人id
	 */
	public String getCreatedBy() {
		return createdBy;
	}
  	
	/**
	 * 设置创建人id
	 * 
	 * @param createdBy 创建人id
	 */
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	/**
	 * 获取创建人
	 * 
	 * @return createdName 创建人
	 */
	public String getCreatedName() {
		return createdName;
	}
  	
	/**
	 * 设置创建人
	 * 
	 * @param createdName 创建人
	 */
	public void setCreatedName(String createdName) {
		this.createdName = createdName;
	}

	/**
	 * 获取创建时间
	 * 
	 * @return createdTime 创建时间
	 */
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}
  	
	/**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 */
	public void setCreatedTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
	}

    public String toString() {
		return new StringBuilder().append("MemberGradeLogEntity{").
			append("id=").append(id).
			append(",busdId=").append(busdId).
			append(",memberId=").append(memberId).
			append(",type=").append(type).
			append(",gradeRule=").append(gradeRule).
			append(",beforeGradeId=").append(beforeGradeId).
			append(",beforeGrade=").append(beforeGrade).
			append(",alferGradeId=").append(alferGradeId).
			append(",afterGrade=").append(afterGrade).
			append(",reason=").append(reason).
			append(",createdBy=").append(createdBy).
			append(",createdName=").append(createdName).
			append(",createdTime=").append(createdTime).
			append('}').toString();
    }

	/**
	 * 复制对象
	 * 
	 * @return 复制后的新实体对象
	 */
	public MemberGradeLogEntity copy() {
		return new MemberGradeLogEntity(this);
	}

    /** 主键 */
	public static final String COL_ID = "id";

    /** 商圈ID */
	public static final String COL_BUSD_ID = "busd_id";

    /** 会员ID */
	public static final String COL_MEMBER_ID = "member_id";

    /** [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER */
	public static final String COL_TYPE = "type";

    /** [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED */
	public static final String COL_GRADE_RULE = "grade_rule";

    /** 变化前id */
	public static final String COL_BEFORE_GRADE_ID = "before_grade_id";

    /** 更新前等级 */
	public static final String COL_BEFORE_GRADE = "before_grade";

    /** 变化后id */
	public static final String COL_ALFER_GRADE_ID = "alfer_grade_id";

    /** 更新后等级 */
	public static final String COL_AFTER_GRADE = "after_grade";

    /** 更新原因 */
	public static final String COL_REASON = "reason";

    /** 创建人id */
	public static final String COL_CREATED_BY = "created_by";

    /** 创建人 */
	public static final String COL_CREATED_NAME = "created_name";

    /** 创建时间 */
	public static final String COL_CREATED_TIME = "created_time";
}
